﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.Objects;

namespace medder
{
    public partial class MainFormPatient : Form
    {
        User user;
        Patient patient;

        MedBaseEntities med = new MedBaseEntities();
        public static ObjectSet<User> users;
        public static ObjectSet<Patient> patients;

        public MainFormPatient(User user)
        {
            InitializeComponent();
            this.user = user;
            users = med.Users;
            patients = med.Patients;

            patient = patients.Where(x => x.Passport == user.Passport).FirstOrDefault();
        }

        private void личныеДанныеToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void записатьсяНаПриемToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AssignPat fm = new AssignPat(patient);
            fm.ShowDialog();
        }
    }
}
